package com.edu.bean;
/*
 * @Author:princess
 * @Date 2023/10/23 10 23 20:44
 *
 */

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;


/**
 * @author 思思
 */
public class MyBeanPostProcessor implements BeanPostProcessor  {
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("5.执行 Bean后处理器的 前置处理方法");
        return BeanPostProcessor.super.postProcessBeforeInitialization(bean, beanName);
    }

    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("8.执行 bean后处理的的 后置处理方法");
        return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName);
    }
}
